package com.csjbot.weedle_auto.SerialServer.util.bean

import java.io.Serializable

/**
 * Created by chenqi on 8/7/17.
 */

class SerialPortOtherBean : Serializable {
    var scr: Int = 0//急停
    private var INFRARED: Int = 0//红外
    private var PLATE_INFRARED: Int = 0//餐盘红外
    var oa: Int = 0//超声波

    constructor()

    constructor(scr: Int, INFRARED: Int, PLATE_INFRARED: Int, oa: Int) {
        this.scr = scr
        this.INFRARED = INFRARED
        this.PLATE_INFRARED = PLATE_INFRARED
        this.oa = oa
    }


    val infrared: Int
        get() = INFRARED


    val platE_INFRARED: Int
        get() = PLATE_INFRARED


    override fun toString(): String {
        return "急停：" + scr + "\r\n" +
                "超声波：" + oa + "\r\n"
    }

    fun toString2(): String {
        return "急停：" + scr + "\r\n" +
                "超声波：" + oa + "\r\n" +
                "手臂红外：" + INFRARED + "\r\n" +
                "下红外：" + PLATE_INFRARED + "\r\n"
    }
}
